Skip to content

tiny-agent: switch to autotools build#2

Open
vishnu-santhosh wants to merge 1 commit into
vivekvjnk:masterfrom
vishnu-santhosh:feat/autotools
Open

tiny-agent: switch to autotools build#2
vishnu-santhosh wants to merge 1 commit into
vivekvjnk:masterfrom
vishnu-santhosh:feat/autotools

Conversation

@vishnu-santhosh
Copy link
Copy Markdown
Contributor

The Yocto recipe in meta-tiny-agent inherits the autotools class, which expects a standard ./configure && make && make install DESTDIR=... flow. The hand-rolled Makefile supported none of what the recipe needs:

  • No --host= cross-compilation (Yocto builds on x86_64 host for arm/x86_64 target via sysroot + cross-toolchain)
  • No DESTDIR honored by install (breaks Yocto's do_install)
  • No --prefix/--sysconfdir for FHS-correct file placement
  • No PKG_CHECK_MODULES for sysroot-aware libcurl/jansson detection (needed in Phase 2)
  • No make distcheck to catch any of the above pre-package

Re-implementing all of that manually would mean rewriting half of automake and getting it wrong. autoconf+automake is what Yocto expects, so we use it.

configure.ac currently checks only for pty.h and forkpty() in libutil; libcurl, jansson, and systemd detection are deferred to the PRs that add code depending on them. Same source, same binary, same behavior - only the build system changes.

Build: ./autogen.sh && ./configure && make
Verify: make distcheck (passes clean)
Clean: git clean -fdX (removes all gitignored autotools artifacts)

Binary moves from build/pty_test to src/pty_test.

The Yocto recipe in meta-tiny-agent inherits the `autotools` class,
which expects a standard `./configure && make && make install
DESTDIR=...` flow. The hand-rolled Makefile supported none of what
the recipe needs:

  - No `--host=` cross-compilation (Yocto builds on x86_64 host for
    arm/x86_64 target via sysroot + cross-toolchain)
  - No `DESTDIR` honored by install (breaks Yocto's `do_install`)
  - No `--prefix`/`--sysconfdir` for FHS-correct file placement
  - No `PKG_CHECK_MODULES` for sysroot-aware libcurl/jansson
    detection (needed in Phase 2)
  - No `make distcheck` to catch any of the above pre-package

Re-implementing all of that manually would mean rewriting half of
automake and getting it wrong. autoconf+automake is what Yocto
expects, so we use it.

configure.ac currently checks only for pty.h and forkpty() in
libutil; libcurl, jansson, and systemd detection are deferred to
the PRs that add code depending on them. Same source, same binary,
same behavior - only the build system changes.

Build:  ./autogen.sh && ./configure && make
Verify: make distcheck (passes clean)
Clean:  git clean -fdX  (removes all gitignored autotools artifacts)

Binary moves from build/pty_test to src/pty_test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant